import type { MockMethod } from 'vite-plugin-mock'
import mock_key from "mockjs"
const { Random } = mock_key
export default [
  {
    url: '/api/JingQing/GetZhiBiao',
    method: 'post',
    response: () => {
      return {
        code: 200,
        message: '请求成功',
        type: 'success',
        result: {
          "totalCount": "8082",
          "deptName": [
            "承德市公安局交通警察支队",
            "双桥分局",
            "双滦分局",
            "营子分局",
            "高新分局",
            "御道口分局",
            "承德县局",
            "兴隆县局",
            "平泉市局",
            "滦平县局",
            "隆化县局",
            "丰宁县局",
            "宽城公安",
            "围场县局",
            "旅游分局",
            "钢城分局"
          ],
          "count": [
            2318,
            393,
            608,
            70,
            140,
            10,
            120,
            761,
            349,
            801,
            146,
            999,
            343,
            979,
            5,
            40
          ]
        },
      }
    },
  },
  {
    url: '/api/Login/GetnameTest',
    method: 'post',
    response: () => {
      return {
        code: 200,
        message: '请求成功',
        type: 'success',
        result: {
          name: '曾小贤',
          age: 18,
          avatar: '/avatar/xj.jpg',
        },
      }
    },
  },
  {
    url: '/api/loginTest',
    method: 'post',
    response: () => {
      return {
        code: 200,
        message: '登录成功',
        type: 'success',
        result: {
          "token": Random.string(10),
          "user": {
            "Id": "1003",
            "LoginName": "admin",
            "Password": null,
            "ShiCode": "130800000000",
            "XianCode": "130825000000",
            "DeptCode": "130825020000",
            "RoleId": "02",
            "Name": "操作员",
            "PhoneNum": "",
            "CardNum": "065548",
            "PliceNum": "",
            "Permission": ['editor_markdown', 'article_edit'],
          }

        },
      }
    },
  },
  {
    url: '/api/MainPage/GetMainPageJsonTest',
    method: 'post',
    response: () => {
      return {
        code: 200,
        message: 'ok',
        type: 'json',
        result: {
          totalData: {
            faAnShu: "151",
            sunShiShu: "650",
            poAnShu: "20",
            xSZhuaRen: "30",
            xZZhuaRen: "50",
            wanSunShu: "20",
          },
          faAnLeiXing: {
            leiXingZhanBi: [
              {
                value: 90,
                name: "刷单",
              },
              {
                value: 20,
                name: "虚假贷款",
              },
              {
                value: 10,
                name: "冒充客服",
              },
              {
                value: 15,
                name: "投资理财",
              },
              {
                value: 0,
                name: "冒充公检法",
              },
              {
                value: 15,
                name: "虚假购物、服务",
              },
              {
                value: 15,
                name: "网络游戏虚假交易",
              },
            ],
          },
          shouPianRenQun: {
            renQunZhanBi: [
              {
                value: 70,
                name: "无业人员",
              },
              {
                value: 25,
                name: "学生",
              },
              {
                value: 30,
                name: "老年人",
              },
              {
                value: 15,
                name: "教师",
              },
              {
                value: 2,
                name: "公务员",
              },
              {
                value: 8,
                name: "企业员工",
              },
              {
                value: 9,
                name: "事业单位",
              },
            ],
          },
           sunShiShu: {
            sunShiShuZhanBi: [
              {
                value: 70,
                name: "1万以下",
              },
              {
                value: 25,
                name: "1万至5万",
              },
              {
                value: 30,
                name: "5万至10万",
              },
              {
                value: 15,
                name: "10万至20万",
              },
              {
                value: 5,
                name: "20万至50万",
              },
              {
                value: 1,
                name: "50万至100万",
              },
              {
                value: 0,
                name: "100万以上",
              },
            ],
          },
          faAnXiaQu: {
            XiaQuFenZu: [
              "隆化镇",
              "郊区",
              "韩麻营",
              "七家",
              "张三营",
              "汤头沟",
              "步古沟",
              "郭家屯",
              "蓝旗",
              "汤头沟",
            ],
            XiaQuShuJu: [
              80,
              10,
              14,
              12,
              17,
              16,
              5,
              9,
              3,
              8,
            ],
          },
        },
      }
    },
  },
] as MockMethod[]